<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            font-size: 40px;
            height: 200px;
            background-color: orange;
            /*靠顶部：lineHeight=0,默认0*/
            /*靠底部：lineHeight=height*2-fontSize*/
            /*中间显示：lineHeight=height*/
            line-height:200px;
        }
    </style>
</head>
<body>
<div>abc你好</div>
</body>
</html>